package demo.java8.testLambda;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/4/21.
 */
@RestController
public class MvcTest {
    @RequestMapping(value="exam")
    public Map<String,Object> exam(String id){
        return examListForTeacher.viewMvc(id);
    }

    MvcInterface<String> examListForTeacher =
            studentId ->{
                Map map =new HashMap<String,Object>();
                if(null == studentId){
                    map.put("test","view");
                }else{
                    map.put("id",studentId);
                }
                return map;
            };
}
